#pragma once
#include <OSProc.h>


//Process ID
#define ALL_PROCESS	0


#define MessageMask(x)	(x & 0xFF000000) //little endian
#define InforMask(x)	(x << 8)
//Message ID (only 256)
#define ALL_MESSAGE	0
#define IS_SYSTEM	(1 << 31)
#define SYSTEM_MASK	((~0) >> 1)


void SendMessage(_pcb* pHandle,unsigned long mark,unsigned long* argv,unsigned long args);
_hook* SetHookToMessage(_pcb* from,_pcb* fHandle,unsigned long mark,void (*fun)(struct THRECB*,unsigned long,unsigned long*,unsigned long));
void CheckMessage();//unfinished
void DeleteMessage(_msg* message);
void DeleteAllMessage(_msg* message);
void DeleteHookToMessage(_hook* handle);
void DeleteAllHookToMessage(_hook* handle);
int SendText(_tcb* thr,unsigned int text);
int GetText(_tcb* thr,unsigned int* text);
unsigned int WaitForText();
